﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>ChangePwd</title>
</head>
<head>
    <meta name="viewport" content="width=device-width" />
    <link rel="stylesheet" href="/css/login.css">
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    @*<script src="~/js/jquery.min.js"></script>*@
    <script type="text/javascript" src="/js/index.js"></script>
    <script src="/lib/layui/layui.js" charset="utf-8"></script>
    <title>ChangepPwd</title>
</head>
<body>
    <div class="x-body">
        <form class="layui-form" method="post" id="fm">
            <div class="layui-form-item">
                <label for="username" class="layui-form-label"> 昵称</label>
                <div class="layui-input-inline">
                    <input type="text" value="@ViewBag.Name" name="username" lay-verify="required" class="layui-input" disabled="disabled">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="phone" class="layui-form-label">
                    <span class="x-red">*</span>旧密码
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="=oldpass" name="oldpass" required="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_pass" class="layui-form-label">
                    <span class="x-red">*</span>密码
                </label>
                <div class="layui-input-inline">
                    <input type="password" id="newpass" name="newpass" required="" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    6到16个字符(必须包含数字)
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_repass" class="layui-form-label">
                    <span class="x-red">*</span>确认密码
                </label>
                <div class="layui-input-inline">
                    <input type="password" id="repass" name="repass" required="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="L_repass" class="layui-form-label"> </label>
                <button class="layui-btn" lay-submit="" onclick="Ture()"> 确定 </button>

            </div>
        </form>
    </div>
    <script>
        function Ture() {
            var p = $("#fm").serialize();
            $.post("/Home/ChangePwd/", p, function (res) {
                if (res.success)
                    layer.msg("修改成功", { icon: 6, timeout: 2000 });
                else
                    layer.alert("修改失败" + res.message, { icon: 5 });
            }, "Json");

        }
        </script>
</body>
</html>